package com.xu.fountain.Config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @Message: created by XUBO on 2018/4/31
 * @Description:
 */
@Configuration
public class WebMvcConfigurer  extends WebMvcConfigurerAdapter{

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor( new ApiInterceptor() ).addPathPatterns( "/api/**" );
        registry.addInterceptor( new AdminInterceptor() ).addPathPatterns( "/admin/**" );
        super.addInterceptors( registry );
    }



}
